# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 69
n 69(None)[]:
	i: 39(), 54(), 67(AE)
	o: 

nname: 67
n 67(None)[]:
	i: 44(f)
	o: 69(AE)

nname: 54
n 54(None)[#, e
return False
]:
	i: 44(t)
	o: 69()

nname: 44
n 44(<dummy_ex3> EXC_MATCH Exception)[]:
	i: 0(except)
	o: 54(t), 67(f)

nname: 39
n 39(None)[return context['selected'].type in ('dir', 'disc', 'usb')
]:
	i: 3(f), 22()
	o: 69()

nname: 22
n 22(None)[]:
	i: 3(t)
	o: 39()

nname: 3
n 3(context['selected'].type in ('dir', 'disc', 'usb'))[]:
	i: 0(try)
	o: 22(t), 39(f)

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 44(except)

nname: 69
n 69(None)[]:
	i: 39(), 44()
	o: 

nname: 44
n 44(None)[except Exception, e:
	return False
]:
	i: 0()
	o: 69()

nname: 39
n 39(None)[return context['selected'].type in ('dir', 'disc', 'usb')
]:
	i: 0(f)
	o: 69()

nname: 0
n 0(None)[try:
	if context['selected'].type in ('dir', 'disc', 'usb'):
		pass
]:
	i: 
	o: 39(), 44()

self.nodes: {0: <unpyclib.structure.node instance at 0xb757b70c>, 39: <unpyclib.structure.node instance at 0xb757b18c>, 44: <unpyclib.structure.node instance at 0xb757be2c>, 69: <unpyclib.structure.node instance at 0xb757b38c>}
nname: 276
n 276(None)[]:
	i: 67(AL), 232(), 236()
	o: 

nname: 236
n 236(None)[dst = context['selected'].filename
process(GraphicalCopy(context['selected'], fl, dst))
]:
	i: 23(f)
	o: 276()

nname: 232
n 232(None)[]:
	i: 177(AF), 187()
	o: 276()

nname: 187
n 187(None)[for item in fl.items:
log.debug('Add to burnlist : %s' % item.filename)
burn_clt.add_files(item.filename, dir)
]:
	i: 177(for)
	o: 232()

nname: 177
n 177(None)[]:
	i: 67(loop)
	o: 187(for), 232(AF)

nname: 67
n 67(None)[mountpoint = context['selected']['media'].mountpoint
dir = context['selected'].filename.replace(mountpoint, '/', 1)
burn_clt = WyXMLRPCProxy('/tmp/wy_burning')
burn_clt.new_burning()
burn_clt.set_burn_mode('data_cd')
burn_clt.set_finalized(False)
burn_clt.set_new_session(False)
]:
	i: 23(t)
	o: 177(loop), 276(AL)

nname: 23
n 23(context['selected'].type in ('disc', 'dvd'))[fl = markerlists().get(context['menu'].universe)
]:
	i: 12(), 22()
	o: 67(t), 236(f)

nname: 22
n 22(None)[]:
	i: 0(t)
	o: 23()

nname: 12
n 12(None)[raise IncompatibleMarkerlistDestination
]:
	i: 0(f)
	o: 23()

nname: 0
n 0(is_compatible(context))[]:
	i: 
	o: 12(f), 22(t)

nname: 276
n 276(None)[]:
	i: 187(), 236()
	o: 

nname: 236
n 236(None)[dst = context['selected'].filename
process(GraphicalCopy(context['selected'], fl, dst))
]:
	i: 0(f)
	o: 276()

nname: 187
n 187(None)[for item in fl.items:
	log.debug('Add to burnlist : %s' % item.filename)
	burn_clt.add_files(item.filename, dir)
]:
	i: 67(for)
	o: 276()

nname: 67
n 67(None)[mountpoint = context['selected']['media'].mountpoint
dir = context['selected'].filename.replace(mountpoint, '/', 1)
burn_clt = WyXMLRPCProxy('/tmp/wy_burning')
burn_clt.new_burning()
burn_clt.set_burn_mode('data_cd')
burn_clt.set_finalized(False)
burn_clt.set_new_session(False)
]:
	i: 0(t)
	o: 187(for)

nname: 0
n 0(context['selected'].type in ('disc', 'dvd'))[if not is_compatible(context):
	raise IncompatibleMarkerlistDestination
fl = markerlists().get(context['menu'].universe)
]:
	i: 
	o: 67(t), 236(f)

nname: 276
n 276(None)[]:
	i: 67(), 236()
	o: 

nname: 236
n 236(None)[dst = context['selected'].filename
process(GraphicalCopy(context['selected'], fl, dst))
]:
	i: 0(f)
	o: 276()

nname: 67
n 67(None)[mountpoint = context['selected']['media'].mountpoint
dir = context['selected'].filename.replace(mountpoint, '/', 1)
burn_clt = WyXMLRPCProxy('/tmp/wy_burning')
burn_clt.new_burning()
burn_clt.set_burn_mode('data_cd')
burn_clt.set_finalized(False)
burn_clt.set_new_session(False)
for item in fl.items:
	log.debug('Add to burnlist : %s' % item.filename)
	burn_clt.add_files(item.filename, dir)
]:
	i: 0(t)
	o: 276()

nname: 0
n 0(context['selected'].type in ('disc', 'dvd'))[if not is_compatible(context):
	raise IncompatibleMarkerlistDestination
fl = markerlists().get(context['menu'].universe)
]:
	i: 
	o: 67(t), 236(f)

nname: 0
n 0(None)[if not is_compatible(context):
	raise IncompatibleMarkerlistDestination
fl = markerlists().get(context['menu'].universe)
if context['selected'].type in ('disc', 'dvd'):
	mountpoint = context['selected']['media'].mountpoint
	dir = context['selected'].filename.replace(mountpoint, '/', 1)
	burn_clt = WyXMLRPCProxy('/tmp/wy_burning')
	burn_clt.new_burning()
	burn_clt.set_burn_mode('data_cd')
	burn_clt.set_finalized(False)
	burn_clt.set_new_session(False)
	for item in fl.items:
		log.debug('Add to burnlist : %s' % item.filename)
		burn_clt.add_files(item.filename, dir)
else:
	dst = context['selected'].filename
	process(GraphicalCopy(context['selected'], fl, dst))
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb757be0c>}
nname: 0
n 0(None)[from __future__ import absolute_import
from WyRPC import WyXMLRPCProxy
from peewee.debug import log
from marker_dup_to_parent import process, GraphicalCopy
from pygui.markerlist import get_marker_from_item, IncompatibleMarkerlistDestination, markerlists
caption = 'Duplicate marked items into "%(highlighted_item)s"'
def is_compatible(context):
	try:
		if context['selected'].type in ('dir', 'disc', 'usb'):
			pass

def execute(context):
	if not is_compatible(context):
		raise IncompatibleMarkerlistDestination
	fl = markerlists().get(context['menu'].universe)
	if context['selected'].type in ('disc', 'dvd'):
		mountpoint = context['selected']['media'].mountpoint
		dir = context['selected'].filename.replace(mountpoint, '/', 1)
		burn_clt = WyXMLRPCProxy('/tmp/wy_burning')
		burn_clt.new_burning()
		burn_clt.set_burn_mode('data_cd')
		burn_clt.set_finalized(False)
		burn_clt.set_new_session(False)
		for item in fl.items:
			log.debug('Add to burnlist : %s' % item.filename)
			burn_clt.add_files(item.filename, dir)
	else:
		dst = context['selected'].filename
		process(GraphicalCopy(context['selected'], fl, dst))

]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75768cc>}
from __future__ import absolute_import
from WyRPC import WyXMLRPCProxy
from peewee.debug import log
from marker_dup_to_parent import process, GraphicalCopy
from pygui.markerlist import get_marker_from_item, IncompatibleMarkerlistDestination, markerlists
caption = 'Duplicate marked items into "%(highlighted_item)s"'
def is_compatible(context):
	try:
		if context['selected'].type in ('dir', 'disc', 'usb'):
			pass

def execute(context):
	if not is_compatible(context):
		raise IncompatibleMarkerlistDestination
	fl = markerlists().get(context['menu'].universe)
	if context['selected'].type in ('disc', 'dvd'):
		mountpoint = context['selected']['media'].mountpoint
		dir = context['selected'].filename.replace(mountpoint, '/', 1)
		burn_clt = WyXMLRPCProxy('/tmp/wy_burning')
		burn_clt.new_burning()
		burn_clt.set_burn_mode('data_cd')
		burn_clt.set_finalized(False)
		burn_clt.set_new_session(False)
		for item in fl.items:
			log.debug('Add to burnlist : %s' % item.filename)
			burn_clt.add_files(item.filename, dir)
	else:
		dst = context['selected'].filename
		process(GraphicalCopy(context['selected'], fl, dst))

